Hmmm. I'd recommend considering turning this inside out. How about having a File object (with a Directory subclass) that you can match against criteria. The Dir subclass can then manage a list of File objects.
I did a simple version of this by subclassing String and adding pathname knowledge to it. That way I didn't have to have Directory objects for each dir in the path. I could have one object whose path was "/foo/bar/baz" and whose file name was "/wilma", or four objects ("foo", parented by "/"; "bar", parented by the "/foo" object, etc)
This let me roll the dir stuff into a nice encapsulated set of methods.
Searching can be done in memory, or by going out to the actual dir file itself.
---
Bruce McKenzie (spuds@netcom.com, NeXTMail welcome)
Independent Software Contractor, specializing in NEXTSTEP.